package com.tuanzi.loan.web.lazy.templateConf;

import com.tuanzi.loan.business.service.templateConf.ActivityService;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.templateConf.ActivityRequest;
import com.tuanzi.loan.vo.response.templateConf.ActivityResponse;
import com.tuanzi.loan.web.bean.CurrentUserBean;
import com.tuanzi.loan.web.lazy.LazyDataSessionModel;
import org.springframework.data.domain.Page;

public class ActivityLazyDataModel extends LazyDataSessionModel<ActivityRequest, ActivityResponse> {

	private static final long serialVersionUID = 3610077955662606238L;

	private ActivityService activityService;

	public ActivityLazyDataModel(ActivityRequest searchRequest, CurrentUserBean session, ActivityService activityService) {
		super(searchRequest, session);
		this.activityService = activityService;
	}

	@Override
	protected Page<ActivityResponse> doLoad0(PageSearcher<ActivityRequest> pageSearcher) {
		return activityService.list(pageSearcher);
	}

}
